﻿using System;
using System.Data;
using System.Collections.Generic;

namespace LDSP.BRL
{
    public partial class R_PlanPrinciple : BYFW.BOL.BaseEntity
    {
        public R_PlanPrinciple()
        {
            m_tableName = "t_r_plan_user";
            m_tblCacheManager.IsEnable = true;
        }

        protected int m_planID = 0;
        protected int m_userID = 0;

        /// <summary>
        /// 任务计划ID
        /// </summary>
        public int PlanID
        {
            get { return m_planID; }
            set { m_planID = value; }
        }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserID
        {
            get { return m_userID; }
            set { m_userID = value; }
        }

        protected override void FillContainer()
        {
            base.FillContainer();
            m_container.Add("planID", m_planID);
            m_container.Add("userID", m_userID);
        }

        public override bool GetProperties(System.Data.DataRow record)
        {
            if (!base.GetProperties(record))
            {
                return false;
            }
            m_planID = this.GetIntValue(record, "planID");
            m_userID = this.GetIntValue(record, "userID");
            return true;
        }


        public List<R_PlanPrinciple> GetListByPlan(int planID)
        {
            return this.GetSpecialList<R_PlanPrinciple>(null, "planID", planID);
        }
    }
}
